From: Debian Science Maintainers Date: Tue, 9 Dec 2025 11:19:37 +0000 (+0000) Subject: Fix some xarray fails, test others X-Git-Tag: archive/raspbian/2.3.3+dfsg-3+rpi1^2~7 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e3845bf64df6f3618b5ec6e3d4c26de779ef7dda;p=pandas.git Fix some xarray fails, test others Tests failing with newer xarray Author: Rebecca N. Palmer Bug: partly https://github.com/pydata/xarray/issues/9661 Bug-Debian: https://bugs.debian.org/1088988 Forwarded: no Gbp-Pq: Name 1088988_xarray_pyreadstat_compat.patch --- diff --git a/pandas/tests/generic/test_to_xarray.py b/pandas/tests/generic/test_to_xarray.py index e882a3b7..0d5c0bec 100644 --- a/pandas/tests/generic/test_to_xarray.py +++ b/pandas/tests/generic/test_to_xarray.py @@ -54,9 +54,10 @@ class TestDataFrameToXArray: # datetimes w/tz are preserved # column names are lost expected = df.copy() - expected["f"] = expected["f"].astype( - object if not using_infer_string else "str" - ) + # breaks in xarray >= 2024.10.0(?) + # debug print + r0 = result.to_dataframe() + print("expected",expected, expected.index, expected.dtypes, "actual",result, r0, r0.index, r0.dtypes,sep='\n') expected.columns.name = None tm.assert_frame_equal(result.to_dataframe(), expected)